<template>
<div>
	<admin-nav/>
    <div class="container-fluid">
      <div class="row">
		<admin-left/>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          <h1 class="page-header">{{product.title}}项目</h1>
		
			<ul class="nav nav-tabs">
		  <li role="presentation" class="active"><a style="color:black" href="product-info1.html">基本信息</a></li>
		  <li role="presentation"><a style="color:black" href="product-info2.html">项目信息</a></li>
		  <li role="presentation"><a style="color:black" href="product-info3.html">项目评论</a></li>
		  <li role="presentation"><a style="color:black" href="product-info4.html">项目进度</a></li>
		  <li role="presentation"><a style="color:black" href="product-info5.html">项目跟踪</a></li>
		</ul>
          <div>
          		<div class="panel panel-default">
				  <div class="panel-heading">
				    <h3 class="panel-title">申请人信息</h3>
				  </div>
				  <div class="panel-body">
				    <p>以下内容仅做示例</p>
				    <table class="table table-bordered">
				    	
					  <tr>
					  	<th>申请人</th>
					  	<td>{{user.username}}</td>
					  </tr>
					  <tr>
					  	<th>申请人身份证</th>
					  	<td>{{user.idcard}}</td>
					  </tr>
					  <tr>
					  	<th>申请人地址</th>
					  	<td>不告诉你</td>
					  </tr>
					  <tr>
					  	<th>客服联系人</th>
					  	<td>{{product.serviceName}}</td>
					  </tr>
					  <tr>
					  	<th>客服联系电话</th>
					  	<td>{{product.servicePhone}}</td>
					  </tr>
					  <tr>
					  	<th>其它</th>
					  	<td>这只是个示例</td>
					  </tr>
					</table>
				  </div>
				</div>
				
				<div class="panel panel-default">
				  <div class="panel-heading">
				    <h3 class="panel-title">项目信息</h3>
				  </div>
				  <div class="panel-body">
				    <p>以下内容仅做示例</p>
				    <table class="table table-bordered">
				    	
					  <tr>
					  	<th>项目类型</th>
					  	<td>{{type.name}}</td>
					  </tr>
					  <tr>
					  	<th>项目标题</th>
					  	<td>{{product.title}}</td>
					  </tr>
					  <tr>
					  	<th>筹款目的</th>
					  	<td>{{product.goal}}</td>
					  </tr>
					  <tr>
					  	<th>项目地点</th>
					  	<td>你猜</td>
					  </tr>
					  <tr>
					  	<th>筹资金额</th>
					  	<td>{{product.money}}</td>
					  </tr>
					  <tr>
					  	<th>筹资天数</th>
					  	<td>{{product.days}}</td>
					  </tr>
					  <tr>
					  	<th>自定义标签</th>
					  	<td>xxxxxx,xxx,xx,xx,</td>
					  </tr>
					  <tr>
					  	<th>封面图</th>
					  	<td><img :src="product.imageUrl"></td>
					  </tr>
					  <tr>
					  	<th>其它</th>
					  	<td>这只是个示例</td>
					  </tr>
					</table>
				  </div>
				</div>
          </div>
        </div>
      </div>
    </div>
</div>
</template>

<script>
import Admin_left from './admin_left.vue'
import admin_nav from './admin_nav.vue'
export default {
  components: { admin_nav, Admin_left },
  data() {
	return {
		product:{
		serviceName:'',
		servicePhone:'',
		title:'',
		goal:'',
		money:'',
		days:'',
		imageUrl:''
		},
		user:{
			username:'',
			idcard:''
		},
		type:{
			name:''
		}
	}
  },
  created(){
		this.$axios.get("http://localhost:8080/getProductById?id="+sessionStorage.getItem("getProductById")).then((response) => {
		if (response.data.code === 0) {
			console.log(response.data.msg);
		} else {
			this.product = response.data.data[0],
			alert(this.product.imageUrl)
			this.user = response.data.data[1],
			this.type = response.data.data[2]
		}
	});
  },
  methods:{

  }

}
</script>

<style scoped>
    @import url('../../../public/css/bootstrap.min.css');
    @import url('../../../public/css/dashboard.css');
</style>>